<?php
/*
function GetStateNames()
{
        $conn = getConnection();
        $result = $conn->query('SELECT StateFullName FROM US_States SFull');
        echo json_encode($result);
        
}

function GetStateInitials()
{
		$conn = getConnection();
        $result = $conn->query('SELECT StateInitials FROM US_States SInitials');
        return $result;
}
*/
function get_StateNames() 
{
        $conn = getConnection();
		$StateNames = false;
		$temp = $_GET['term'];
        if($temp)
		{
			//$StateNames = $conn->query('SELECT StateFullName FROM US_States');
			$sql = 'SELECT StateFullName FROM US_States '
				.  "WHERE_LIKE (StateFullName, '$_temp')";
			$StateNames = $this->$conn->query($sql);
		}
		echo json_encode($StateNames);
		
}
